home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
FromTheMag
/
JW FLV MEDIA PLAYER 4.2
/
mediaplayer.exe
/
player.swf
/
scripts
/
com
/
jeroenwijering
/
utils
/
NetClient.as
< prev
next >
Wrap
Text File
|
2008-11-04
|
2KB
|
95 lines
package com.jeroenwijering.utils
{
public class NetClient
{
private var callback:Object;
public function NetClient(param1:Object)
{
super();
callback = param1;
}
public function onImageData(param1:Object) : void
{
forward(param1,"imagedata");
}
public function onLastSecond(param1:Object) : void
{
forward(param1,"lastsecond");
}
private function forward(param1:Object, param2:String) : void
{
param1["type"] = param2;
callback.onData(param1);
}
public function onCaption(param1:String, param2:Number) : void
{
forward({
"captions":param1,
"speaker":param2
},"caption");
}
public function onMetaData(param1:Object) : void
{
forward(param1,"metadata");
}
public function onPlayStatus(param1:Object) : void
{
if(param1.code == "NetStream.Play.Complete")
{
forward(param1,"complete");
}
else
{
forward(param1,"playstatus");
}
}
public function onBWCheck(... rest) : Number
{
return 0;
}
public function onCaptionInfo(param1:Object) : void
{
forward(param1,"captioninfo");
}
public function onBWDone(... rest) : void
{
if(rest.length > 0)
{
forward({"bandwidth":rest[0]},"bandwidth");
}
}
public function onTextData(param1:Object) : void
{
forward(param1,"textdata");
}
public function RtmpSampleAccess(param1:Object) : void
{
forward(param1,"rtmpsampleaccess");
}
public function onCuePoint(param1:Object) : void
{
forward(param1,"cuepoint");
}
public function onFCSubscribe(param1:Object) : void
{
forward(param1,"fcsubscribe");
}
}
}